package com.tanhua.model.db;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

//冻结用户记录表
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Freeze implements Serializable {

    private Long id;

    private Long userId; //用户id

    private Integer freezingTime; //冻结时间，1为冻结3天，2为冻结7天，3为永久冻结

    private Integer freezingRange; //冻结范围，1为冻结登录，2为冻结发言，3为冻结发布动态

    private String reasonsForFreezing; //冻结原因

    private String frozenRemarks; //冻结备注

    private String reasonsForThawing; //解冻原因

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date unfreezeTime; //解冻时间

    public Freeze(Long userId, Integer freezingTime, Integer freezingRange, String reasonsForFreezing, String frozenRemarks) {
        this.userId = userId;
        this.freezingTime = freezingTime;
        this.freezingRange = freezingRange;
        this.reasonsForFreezing = reasonsForFreezing;
        this.frozenRemarks = frozenRemarks;
    }
}
